<template>
  <div class="search-input flex f-ai-c f-jc-sb">
    <input type="text" v-model="keyword" />
    <button @click="handleClickSearch">搜索</button>
  </div>
</template>

<script>
export default {
  name: "SearchInput",
  data() {
    return {
      keyword: ""
    };
  },
  methods: {
    handleClickSearch() {
      const keyword = this.keyword;
      this.$emit("search", keyword);
    }
  }
};
</script>

<style scoped lang="less">
.search-input {
  width: 100%;
  height: 100%;
}
</style>
